package com.service.impl;

import com.model.dto.baseDTO.ResultDTO;
import com.service.ResultService;
import org.springframework.stereotype.Service;

@Service("resultService")
public class ResultServiceImpl implements ResultService {

    public ResultDTO createSuccess(String msg, Object obj) {
        return new ResultDTO("200",msg, obj);
    }

    @Override
    public ResultDTO createSuccess(String msg) {
        return new ResultDTO("200", msg);
    }

    @Override
    public ResultDTO createSuccess() {
        return new ResultDTO("200",null);
    }

    public ResultDTO createFailed(String msg, Object obj) {
        return new ResultDTO("500",msg, obj);
    }

    @Override
    public ResultDTO createFailed(String msg) {
        return new ResultDTO("500", msg);
    }

    @Override
    public ResultDTO createFailed() {
        return new ResultDTO("500", null);
    }
}
